package com.ruoyi.order.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.order.mapper.BOrderMapper;
import com.ruoyi.order.domain.BOrder;
import com.ruoyi.order.service.IBOrderService;

/**
 * 订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-02-14
 */
@Service
public class BOrderServiceImpl implements IBOrderService 
{
    @Autowired
    private BOrderMapper bOrderMapper;

    /**
     * 查询订单
     * 
     * @param id 订单主键
     * @return 订单
     */
    @Override
    public BOrder selectBOrderById(Long id)
    {
        return bOrderMapper.selectBOrderById(id);
    }

    /**
     * 查询订单列表
     * 
     * @param bOrder 订单
     * @return 订单
     */
    @Override
    public List<BOrder> setBOrderList(BOrder bOrder)
    {
        return bOrderMapper.selectBOrderList(bOrder);
    }

    /**
     * 新增订单
     * 
     * @param bOrder 订单
     * @return 结果
     */
    @Override
    public int itBOrder(BOrder bOrder)
    {
        return bOrderMapper.insertBOrder(bOrder);
    }

    /**
     * 修改订单
     * 
     * @param bOrder 订单
     * @return 结果
     */
    @Override
    public int updader(BOrder bOrder)
    {
        return bOrderMapper.updateBOrder(bOrder);
    }

    /**
     * 批量删除订单
     * 
     * @param ids 需要删除的订单主键
     * @return 结果
     */
    @Override
    public int deletrByIds(Long[] ids)
    {
        return bOrderMapper.deleteBOrderByIds(ids);
    }

    /**
     * 删除订单信息
     * 
     * @param id 订单主键
     * @return 结果
     */
    @Override
    public int deleteerById(Long id)
    {
        return bOrderMapper.deleteBOrderById(id);
    }
}
